#!/usr/bin/env python
# webdsk settings
import webdsk.conf as conf

# Application Details
conf.set( 'application', 'Hello World' )
conf.set( 'author', 'John Smith' )
conf.set( 'author_url', 'http://example.com/' )
conf.set( 'copyright', 'Copyright 2010 Example' )
conf.set( 'license', '''Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.''' )
conf.set( 'license_url', 'http://www.apache.org/licenses/LICENSE-2.0' )
conf.set( 'type', 'web' ) # 'web' (Website) or 'dsk' (Desktop)

# Debugging
conf.set( 'debug', True )
conf.set( 'template_debug', True )

# Error Reporting
conf.set( 'log errors', True )
conf.set( 'send email on fatel error', True )
conf.set( 'send email on broken link error', True )
conf.set( 'emails', (
		#( NAME,	EMAIL,			PERMISSION LEVEL [Django Permissions; admin or manager
		#						manager gets only 404 error reporting])
		#( 'Your Name', 'your_email@domain.com', 'admin' ),
		#( 'Your Name', 'your_email@domain.com', 'manager' ),
	) )

# Modules
#   What modules should we get running by default?
conf.load_modules([
	'admin',
	'sessions',
	'auth',
	'database',
	'locale',
	'template',
	#'multisite'
	])

#########################
# Configure Modules
#########################


##################################################
# Admin Module
#   Generate an admin panel authomatically
#   No configuration needed
##################################################


##################################################
# Session Module
#    Handle interaction with session handlers,
#    a cookie interface only, does not deal with
#    user authentication
##################################################


##################################################
# Auth Module
#     Handle Authentication.
#     Detects Google App Engine and
#      uses Google Accounts present.
##################################################
conf.set( 'auth', {
		# Make this unique, and don't share it with anybody.
		'secret_key': '',
	} )


##################################################
# Database Module
##################################################
#   config.set( 'database', {
#       'engine': ''     ,     # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
#       'file': '',            # Path to database file if using sqlite3
#       'user': '',            # Username (not used with sqlite3)
#       'pass': '',            # Password (not used with sqlite3)
#       'host': '',            # Set to empty string for localhost. Not used with sqlite3.
#       'port': '',            # Set to empty string for default. Not used with sqlite3.
#     } )
conf.set( 'database', 'auto' ) # detection for datastore on app engine, otherwise go with sqlite3


##################################################
# LOCAL MODULE
##################################################

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
conf.set( 'timezone', 'UTC' )

# Local Language Settings
#    Language code for this installation. All choices can be found here:
#    http://www.i18nguy.com/unicode/language-identifiers.html
#    @see webdsk.local for more details
#    @note we override Django's language system so we don't
#          have to port language files
conf.set( 'local', 'en-us' )


##################################################
# MEDIA MODULE (Ported from Django)
##################################################
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = ''

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'


##################################################
# TEMPLATE MODULES
##################################################
conf.set( 'template', {

	# List of callables that know how to import templates from various sources.
	'TEMPLATE_LOADERS': (
		'django.template.loaders.filesystem.load_template_source',
		'django.template.loaders.app_directories.load_template_source',
		#'django.template.loaders.eggs.load_template_source',
		),

	'MIDDLEWARE_CLASSES': (
		'django.middleware.common.CommonMiddleware',
		'django.contrib.sessions.middleware.SessionMiddleware',
		'django.contrib.auth.middleware.AuthenticationMiddleware',
		),

	'TEMPLATE_DIRS': (
		# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
		# Always use forward slashes, even on Windows.
		# Don't forget to use absolute paths, not relative paths.
		),
	} )
